package com.qq.Service.ServiceImpl;

import com.qq.dao.UserDao;
import com.qq.Service.UserService;
import com.qq.data.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl  implements UserService {

    @Autowired
    UserDao userDao;


    @Override
    public List<User> findAllUser() {
        return userDao.findAll();
    }

    @Override
    public User getByQq(int qq) {
        return userDao.getByQq(qq);
    }

    @Override
    public User saveUser(User User) {
        return userDao.save(User);
    }

    @Override
    public Integer updadteUserPassword(int user_id, String password) {
        return userDao.updateUserPassword(user_id,password);
    }

    @Override
    public void deleteUser(User User) {
        userDao.delete(User);
    }

}